var OrganizacaoItemRender = new Class({
	"Extends":js.underas.controller.ListViewItemRender
	,"initialize":function(p_obj){						
		var htmlTmp = '<h4>'+p_obj.descricao+'</h4>';
		this.parent('div',htmlTmp);
		this.getEle().addClass("col-xs-12 col-sm-12 col-md-12");
		}
	});



var Organizacao = new Class({
	"Extends":js.underas.container.ModWindow
	,"itIdOrganizacao":null	 
	,"itDescricao":null	 
	,"initialize":function(){
		this.parent("*cadastro de organizacoes.");
		this.setRevision("$Revision: 144 $");	
		this.setSize(4);

		this.itIdOrganizacao = new js.underas.controller.InputText("");
		this.itIdOrganizacao.setColumn("$_id");
		this.itIdOrganizacao.setLabel("cod.");
		this.itIdOrganizacao.setEnable(false);	
		this.itIdOrganizacao.setSize(4);	

		this.itDescricao = new js.underas.controller.InputText("");
		this.itDescricao.setColumn("@descricao");
		this.itDescricao.setLabel("descricao");
		this.itDescricao.setSize(8);	
		
		this.mainList = new js.underas.controller.ListView("Organizacao");
		this.mainList.setItemRender("OrganizacaoItemRender");
		this.mainTb = new js.underas.net.ToolBar({"domain":"organizacao/organizacao"});

		this.append(this.mainTb);
		this.append(this.itIdOrganizacao);	
		this.append(this.itDescricao);	
		this.append(this.mainList);		
		this.addAssociation({"mod":"br.net.atasacramental.membro.view.Membro","puid":this.getVarModule(),"embed":"membros"});
	
		//this.addAssociation({"mod":"br.net.atasacramental.organizacao.view.OrganizacaoLancamento","act":"getByIdOrganizacao","puid":this.getVarModule()});
	}
	,"onStart":function(){
		//this.mainTb.activate(true);
		this.mainTb.reloadItens();
	}
});